function getListMethod(type){
	var methodStr = ''
	switch (type){
		case '调配申请':
			methodStr="web.INMPersonComm:FindTransApp"
			break;
		case '投诉备案':
			methodStr="web.INMPerSubComm:FindCriticList"
			break;
		case '职称备案':
			methodStr="web.INMPersonComm:FindDutyList"
			break;
		case '职务备案':
			methodStr="web.INMPersonComm:FindPostList"
			break;
		case '资格注册备案':
			methodStr="web.INMPerSubComm:FindRegistedList"
			break;
		case '离职备案':
			methodStr="web.INMInternComm:FindResignLists"
			break;
		case '教育信息备案':
			methodStr="web.INMPersonComm:FindEduList"
			break;
		case '工作经历备案':
			methodStr="web.INMPersonComm:FindWorkList"
			break;
		case '进修备案':
			methodStr="web.INMPerSubComm:FindStudyList"
			break;
		case '专科发展备案':
			methodStr="web.INMSpecialComm:FindSpecialList"
			break;
		case '表扬备案':
			methodStr="web.INMPerSubComm:FindPraiseList"
			break;
		case '社会兼职备案':
			methodStr="web.INMPerSubComm:FindSocialWorkList"
			break;
		case '层级备案':
			methodStr="web.INMPersonComm:FindLevelList"
			break;
		default:
			break;
	}
	return methodStr
}

function getListHtml(type,dataDict,perInfo){
	var html = ''
	var titleStr = type;
	var statusDesc = ''
	var iconStr=''
	//'<div class="oneline"><div class="leftText">申请科室：</div><div class="rightText">内分泌科</div></div>'+
	var html1 = '<div class="oneline"><div class="leftText">',html2 = '</div><div class="rightText mui-ellipsis">',html3 = '</div></div>'
	switch (type){
		case '调配申请':
			statusDesc = dataDict['TransStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_03.png"/>'+
				'<div class="headerText mui-ellipsis">'+dataDict['AppNur']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['AppDate']+'</div>'+
				'</div>'+
				html1 + '申请科室：' + html2 + dataDict['AppWard'] 	+ html3 +
				html1 + '申请人数：' + html2 + dataDict['AppCount'] 	+ html3 +
				html1 + '预计天数：' + html2 + dataDict['AppDays']	+ html3
			break;
		case '投诉备案':
			statusDesc = dataDict['criticStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_04.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dealUndefined(dataDict['AppDate'])+'</div>'+
				'</div>'+
				html1 + '来源：' 	+ html2 + dealUndefined(dataDict['criticFrom'])		+ html3 +
				html1 + '发生时间：' + html2 + dealUndefined(dataDict['criticDate'])		+ html3 +
				//html1 + '反馈人：' 	+ html2 + dataDict['criticBack'] 		+ html3 +
				html1 + '处理结果：' + html2 + dealUndefined(dataDict['criticDeal'])	 		+ html3 +
				html1 + '整改效果：' + html2 + dealUndefined(dataDict['criticRectifEffect'])	 		+ html3 +
				//html1 + '事件描述：' + html2 + dataDict['criticDesc'] 		+ html3 +
				//html1 + '整改措施：' + html2 + dataDict['criticRectifAction'] + html3 +
				html1 + '附件：' 	+ html2 + getFileHtml(dataDict['criticFile']) 		+ html3 
			break;
		case '职称备案':
			statusDesc = dataDict['status']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_05.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dealUndefined(dataDict['AppDate'])+'</div>'+
				'</div>'+
				html1 + '聘任职称：' 	+ html2 + dataDict['hireDuty'] 		+ html3 +
				html1 + '聘任开始日期：' + html2 + dataDict['hireStDate'] 	+ html3 +
				html1 + '聘任截止日期：' + html2 + dataDict['hireEndDate'] 	+ html3 +
				html1 + '专业技术职称：' + html2 + dataDict['MajorDuty'] 		+ html3 +
				html1 + '职称取得时间：' + html2 + dataDict['MajorDutyDate'] 	+ html3 +
				html1 + '附件：' 		+ html2 + getFileHtml(dataDict['hirFile']) 	+ html3 
			break;
		case '职务备案':
			statusDesc = dataDict['status']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_06.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['AppDate']+'</div>'+
				'</div>'+
				html1 + '职务名称：' 	+ html2 + dataDict['postDuty'] 		+ html3 +
				html1 + '任命开始日期：' 	+ html2 + dataDict['postStDate'] 	+ html3 +
				html1 + '任命截止日期：' 	+ html2 + dataDict['postEndDate'] 	+ html3 +
				html1 + '备注：' 		+ html2 + dataDict['postRemark'] 	+ html3 
			break;
		case '资格注册备案':
			statusDesc = dataDict['RegistedStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_07.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['AppDate']+'</div>'+
				'</div>'+
				html1 + '注册日期：' + html2 + dataDict['RegistedDate'] 	+ html3 +
				html1 + '附件：' 	+ html2 + getFileHtml(dataDict['registerFile']) + html3 
			break;
		case '离职备案':
			statusDesc = dataDict['resignStatuDesc']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_08.png"/>'+
				'<div class="headerText mui-ellipsis">'+dataDict['creater']+' '+titleStr+'</div>'+
				'<div class="headerTime">'+dataDict['createDate']+'</div>'+
				'</div>'+
				html1 + '离职日期：' + html2 + dataDict['resignDate'] 	+ html3 +
				html1 + '离职原因：' + html2 + dataDict['resignReason'] 	+ html3 
			break;
		case '教育信息备案':
			statusDesc = dataDict['status']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_09.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['createDate']+'</div>'+
				'</div>'+ 
				html1 + '入学日期：' + html2 + dataDict['eduStDate'] 	+ html3 +
				html1 + '毕业日期：' + html2 + dataDict['eduEndDate'] 	+ html3 +
				html1 + '教育性质：' + html2 + dataDict['eduRadio'] 		+ html3 +
				html1 + '毕业院校：' + html2 + dataDict['eduSchool'] 	+ html3 +
				html1 + '专业：' 	+ html2 + dataDict['eduProfession'] + html3 +
				html1 + '学历：' 	+ html2 + dataDict['eduAcademic'] 	+ html3 +
				html1 + '学位：' 	+ html2 + dataDict['eduDegree'] 	+ html3 +
				html1 + '学位日期：' + html2 + dataDict['eduDegreeDate'] + html3 +
				html1 + '附件：' 	+ html2 + getFileHtml(dataDict['eduFile']) + html3 
			break;
		case '工作经历备案':
			statusDesc = dataDict['workStatus']==undefined?'':dataDict['workStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_10.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['createDate']+'</div>'+
				'</div>'+ 
				html1 + '开始日期：' + html2 + dataDict['workStDate'] 	+ html3 +
				html1 + '结束日期：' + html2 + dataDict['workEndDate'] 	+ html3 +
				html1 + '工作单位：' + html2 + dataDict['workUnit'] 		+ html3 +
				html1 + '担任职务：' + html2 + dataDict['workPost'] 		+ html3 +
				html1 + '岗位职称：' + html2 + dataDict['workDuty'] 		+ html3 +
				html1 + '备注：' 	+ html2 + dataDict['workRemark'] 	+ html3 
			break;
		case '进修备案':
			statusDesc = dataDict['studyStatus']==undefined?'':dataDict['studyStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_11.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['createDate']+'</div>'+
				'</div>'+ 
				html1 + '培训专业：' + html2 + dataDict['studyProfession'] 	+ html3 +
				html1 + '培训医院：' + html2 + dataDict['studyHospital'] 	+ html3 +
				html1 + '开始日期：' + html2 + dataDict['studyStDate'] 		+ html3 +
				html1 + '结束日期：' + html2 + dataDict['studyEndDate'] 		+ html3 +
				html1 + '期限：' 	+ html2 + dataDict['studyLength'] 		+ html3 
			break;
		case '专科发展备案':
			statusDesc = dataDict['SpecialStatusDesc']==undefined?'':dataDict['SpecialStatusDesc']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_12.png"/>'+
				'<div class="headerText mui-ellipsis">'+dataDict['PerName']+' '+titleStr+'</div>'+
				'<div class="headerTime">'+dataDict['CreateDate']+'</div>'+
				'</div>'+ 
				html1 + '专科认证单位：' 	+ html2 + dataDict['SpecialAuthDesc'] 		+ html3 +
				html1 + '专科证书：' 	+ html2 + dataDict['SpecialTypeDesc'] 		+ html3 +
				html1 + '专科护士：' 	+ html2 + dataDict['SpecialNurTypeDesc'] 	+ html3 +
				html1 + '取得日期：' 	+ html2 + dataDict['SpecialAuthDate'] 		+ html3 +
				html1 + '附件：' 		+ html2 + getFileHtml(dataDict['SpecialCertificate'])+ html3 
			break;
		case '表扬备案':
			statusDesc = dataDict['praiseStatus']==undefined?'':dataDict['praiseStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_13.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['praiseRecordDate']+'</div>'+
				'</div>'+ 
				html1 + '表扬来源：' 	+ html2 + dataDict['praiseFromDesc'] 	+ html3 +
				//html1 + '事件描述：：' 	+ html2 + dataDict['praiseDesc'] 		+ html3 +
				html1 + '附件：' 		+ html2 + getFileHtml(dataDict['praiseFile']) 	+ html3 
			break;
		case '社会兼职备案':
			statusDesc = dataDict['workStatus']==undefined?'':dataDict['workStatus']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_14.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['createDate']+'</div>'+
				'</div>'+ 
				html1 + '兼职类型：' + html2 + dataDict['workType'] 		+ html3 +
				html1 + '兼职机构：' + html2 + dataDict['workUnitDesc'] 	+ html3 +
				html1 + '担任职务：' + html2 + dataDict['workPost'] 		+ html3 +
				html1 + '开始日期：' + html2 + dataDict['workStDate'] 	+ html3 +
				html1 + '结束日期：' + html2 + dataDict['workEndDate'] 	+ html3 +
				html1 + '备注：' 	+ html2 + dataDict['workRemark'] 	+ html3 
			break;
		case '层级备案':
			statusDesc = dataDict['status']==undefined?'':dataDict['status']
			html = '<div class="liheader">'+
				'<img class="headerImg" src="../../dependence/wkplatform/images/ic_work_user_15.png"/>'+
				'<div class="headerText mui-ellipsis">'+perInfo['loginName']+' '+titleStr+'</div>'+
				//'<div class="headerTime">'+dataDict['createDate']+'</div>'+
				'</div>'+ 
				html1 + '层级：' 	+ html2 + dataDict['nurLevel'] 		+ html3 +
				html1 + '晋升日期：' + html2 + dataDict['levelDate'] 	+ html3 +
				html1 + '系数：' 	+ html2 + dataDict['levelFactor'] 	+ html3 +
				html1 + '备注：' 	+ html2 + dataDict['levelRemark'] 	+ html3 
			break;
		default:
			break;
	}
	var statusIcon = getStatusIcon(statusDesc)
	if (statusIcon != '') {
		html += '<div class="statusIcon"><div class="nurfont '+statusIcon+'"></div></div>';
	}else{
		html += '<div class="statusText">'+statusDesc+'</div>';
	}
	return html
}
function getStatusIcon(statusDesc){
	var statusIcon = ''
	switch (statusDesc){
		case '保存':
		case '已保存':
		case '未提交':
			statusIcon = 'nur-statusS'
			break;
		case '提交':
		case '已提交':
		case '待审核':
			statusIcon = 'nur-statusR'
			break;
		case '审核':
		case '已审核':
		case '审核通过':
			statusIcon = 'nur-statusA'
			break;
		case '驳回':
			statusIcon = 'nur-statusB'
			break;
		default:
			break;
	}
	return statusIcon
}


function getFileHtml(valueStr){
	valueStr = valueStr||""
	var fileArr = valueStr.split('」')
	var html = ''
	for (var j = 0; j < fileArr.length;j++) {
		var oneUrl = fileArr[j]
		var index = oneUrl.lastIndexOf("\/");  
		var fileName=oneUrl.substring(index+1,oneUrl.length);
		if (j > 0) {
			html +=','
		}
		html +=fileName;
	}
	return html
}

function getApplyNewPageName(type){
	var pageName = ''
	switch (type){
		case '调配申请':
			pageName="transNew"
			break;
		case '投诉备案':
		case '表扬备案':
			pageName="criticPraiseNew"
			break;
		case '职称备案':
			pageName="dutyNew"
			break;
		case '职务备案':
			pageName="postNew"
			break;
		case '资格注册备案':
		case '离职备案':
			pageName="registedResignNew"
			break;
		case '教育信息备案':
			pageName="eduNew"
			break;
		case '工作经历备案':
			pageName="workNew"
			break;
		case '进修备案':
			pageName="studyNew"
			break;
		case '专科发展备案':
			pageName="specialNew"
			break;
		case '社会兼职备案':
			pageName="socialWorkNew"
			break;
		case '层级备案':
			pageName="levelNew"
			break;
		default:
			break;
	}
	return pageName
}
function getAbsPosition(item) {
	var actualLeft = item.offsetLeft;
	var actualTop = item.offsetTop;
	var current = item.offsetParent;
	while (current !== null) {
		actualLeft += (current.offsetLeft + current.clientLeft);
		actualTop += (current.offsetTop + current.clientTop);
		current = current.offsetParent;
	}
	return {
		'left': actualLeft,
		'top': actualTop
	};
}

function dealUndefined(str){
	if (str == undefined || str == null) {
		return ''
	}
	return str
}
